package jp.co.dailyReport;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.*;
import org.apache.log4j.Logger;
import org.apache.struts.action.*;

/**
 * ﾒﾆｭｰページのログアウトリンク
 * が押されたときの処理をするクラスです。
 */
public class LogoutAction extends Action {

	private static Logger log = Logger.getLogger(LogoutAction.class);

	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
	 throws IOException, ServletException {

		log.debug("LogoutAction start");
		HttpSession session = request.getSession();
		session.removeAttribute("LoginStaff");
		log.debug("LogoutAction end");
		return mapping.findForward("logout");
	}
}
